package com.qinglian.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qinglian.entity.Evaluate;
import com.qinglian.mapper.EvaluateListMapper;
import com.qinglian.service.IEvaluateListService;
import com.qinglian.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author augn
 * @since 2023-04-29
 */
@Service
public class EvaluateListServiceImpl extends ServiceImpl<EvaluateListMapper, Evaluate> implements IEvaluateListService {

    @Autowired
    private EvaluateListMapper mapper;

    @Override
    public Result<?> addEvaluate(Evaluate evaluate) {
        int insert = mapper.insert(evaluate);
        return Result.success(insert);
    }

    @Override
    public Result<?> delEvaluate(Integer evaId) {
        int i = mapper.deleteById(evaId);
        return Result.success(i);
    }
}
